package com.ln.cmsln.service.impl.bai;

import com.ln.cmsln.mapper.bai.RoleMapper;
import com.ln.cmsln.pojo.entity.bai.Role;
import com.ln.cmsln.pojo.entity.bai.RolePermission;
import com.ln.cmsln.service.bai.RoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author baiyuxiang
 * @description
 * @date 2022/3/31 20:34
 * @Version 1.0
 **/
@Service
public class RoleServiceImpl implements RoleService {
    @Resource
    private RoleMapper rolemapper;

    @Override
    public List<Role> findAllinfo() {

        return rolemapper.findAllinfo();
    }

    @Override
    public void delUser(Role role) {
        rolemapper.delUser(role);

    }

    @Override
    public void delss(List<String> list) {

        rolemapper.delss(list);
    }

    @Override
    public void addUser(Role role) {
        rolemapper.addUser(role);

    }

    @Override
    public Role toUpdate(Role role) {

        return rolemapper.toUpdate(role);
    }

    @Override
    public void updateInfo(Role role) {
        rolemapper.updateInfo(role);

    }



    @Override
    public void addperrole(String id, List<String> list) {
        rolemapper.addperrole(id,list);
    }

    @Override
    public void delperrole(String id) {
        // TODO Auto-generated method stub
        rolemapper.delperrole(id);
    }

    @Override
    public List<RolePermission> getFindbyrid(String id) {
        // TODO Auto-generated method stub
        return rolemapper.getFindbyrid(id);
    }

    @Override
    public List<String> findbyrid(String id) {
        // TODO Auto-generated method stub
        return rolemapper.findbyrid(id);
    }

}
